package com.ruoyi.edu.domain;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.ToString;
import lombok.experimental.Accessors;
import com.ruoyi.common.annotation.Excel;

import java.io.Serializable;
import java.util.Date;
import java.util.Map;
import java.util.HashMap;
import java.math.BigDecimal;

/**
 * 课程视频对象 edu_video
 * 
 * @author niruichen
 * @date 2020-12-22
 */
@Data
@ToString
@EqualsAndHashCode
@NoArgsConstructor
@Accessors(chain = true)
@TableName("edu_video")
public class EduVideo implements Serializable {

private static final long serialVersionUID=1L;


    /** 视频ID */
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private String id;

    /** 课程ID */
    @Excel(name = "课程ID")
    private String courseId;

    /** 章节ID */
    @Excel(name = "章节ID")
    private String chapterId;

    /** 节点名称 */
    @Excel(name = "节点名称")
    private String title;

    /** 视频资源 */
    @Excel(name = "视频资源")
    private String videoSourceId;

    /** 原文件名 */
    @Excel(name = "原文件名")
    private String videoOriginalName;

    /** 显示排序 */
    @Excel(name = "显示排序")
    private Integer sort;

    /** 播放次数 */
    @Excel(name = "播放次数")
    private Long playCount;

    /** 是否免费 */
    @Excel(name = "是否免费")
    private Integer isFree;

    /** 视频时长 */
    @Excel(name = "视频时长")
    private Long duration;

    /** 视频状态 */
    @Excel(name = "视频状态")
    private String status;

    /** 视频大小 */
    @Excel(name = "视频大小")
    private BigDecimal size;

    /** 乐观锁 */
    @Excel(name = "乐观锁")
    private BigDecimal version;

    /** 创建时间 */
    @TableField(fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    /** 更新时间 */
    @TableField(fill = FieldFill.INSERT_UPDATE)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date updateTime;

    @TableField(exist = false)
    private Map<String, Object> params = new HashMap<>();
}
